package com.ruoyi.prodata.controller;

import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.prodata.service.IOrderStatisticsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

@RestController
@RequestMapping("/prodata/orderStatistics")
public class OrderStatisticsController extends BaseController {

    @Autowired
    private IOrderStatisticsService orderStatisticsService;

    @GetMapping("/{projectId}")
    public AjaxResult getOrderStatistics(@PathVariable Long projectId){
        List<Map<String,Object>> list = orderStatisticsService.getOrderStatistics(projectId);
        return success(list);
    }

}
